package com.wispx.gateway.config.config;

import com.wispx.gateway.config.pojo.RouteDefinition;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

import static com.wispx.gateway.common.constant.ConfigConstant.*;

/**
 * Yaml 中的配置
 */
@Data
public class Config {

    // 服务名字（网关名字）
    private String name = DEFAULT_NAME;
    // 占用端口
    private int port = DEFAULT_PORT;
    // 环境
    private String env = DEFAULT_ENV;

    // 配置中心
    private ConfigCenter configCenter = new ConfigCenter();
    // 注册中心
    private RegisterCenter registerCenter = new RegisterCenter();
    // 路由
    private List<RouteDefinition> routes = new ArrayList<>();

    // httpClient
    private HttpClientConfig httpClient = new HttpClientConfig();
    // netty
    private NettyConfig netty = new NettyConfig();

}
